import React, { ReactElement,useEffect } from 'react'
import { Form, Input, Button,message } from 'antd';
import {Link, Redirect,useHistory} from "react-router-dom"
import {useDispatch, useSelector,connect} from "react-redux"
import storageUtils from '../../utils/storageUtils';
import Logo from "../../assets/images/logo.png"
import Footer from "../../components/footer"
import  "./register.less"



interface Props {
    
}


export default function register({}: Props): ReactElement {
    const onFinish = ()=>{
        message.warn("暂不可用")
    }
    return (
        <div className="box">
        <div className="form">
      <div className="bigLogo">
        <img src={Logo} alt="" />
        <h1>赤兔养车</h1>
      </div>

        <Form name="normal_login" className="login-form" onFinish={onFinish}>
        <Form.Item
          name="username"
          rules={[
            {
              required: true,
              message: '用户名不能为空',
            },
          ]}
        >
          <Input className="input" placeholder="用户名" />
        </Form.Item>
        <Form.Item
          name="password"
          rules={[
            {
              required: true,
              message: '密码不能为空',
            },
          ]}
        >
          <Input
            type="password"
            placeholder="密码"
            className="input"
          />
        </Form.Item>
        <Form.Item
          name="confirm"
          rules={[
            {
              required: true,
              message: '密码不能为空',
            },
          ]}
        >
          <Input
            type="password"
            placeholder="确认密码"
            className="input"
          />
        </Form.Item>

        <Form.Item>
          <Button
            type="primary"
            htmlType="submit"
            className="register-form-button"
          >
            立即注册
          </Button>
          <Link to="/login">使用已有账号登录</Link>
        </Form.Item>
      </Form>
      <Footer></Footer>
        </div>
    </div>
    )
}
